<template>
  <div>
    <input class="text-show el-input__inner" :value="text" :style="textStyle" readonly />
  </div>
</template>
  
  <script>
export default {
  name: "textControl",
  props:{
    // fieldid,name,type
    value: "",
    mode: {
      default: "edit", // 编辑模式和 edit， 展示模式 view
    },
    text: {
      type: String,
      default: ''
    },
    textSize: {
      default: 14
    },
    textColor: {
      type: String,
      default: '#000'
    },
    background: {
      type: String,
      default: '#fff'
    },
  },
  data() {
    return {
      
    };
  },
  created() {
    console.log(this.text);
  },
  computed: {
    textStyle() {
      return { fontSize: this.textSize + 'px', color: this.textColor + "!important", background: this.background }
    }
  }
};
</script>
  
  <style scoped>
.text-show {
  width: 200px;
  height: 35px;
  font-size: 16px;
  border: none !important;
}

.el-input__inner {
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
</style>
  